The 3rd sub-project consists in using what I learned in cartography with R. For this, we will use Eurostat data which contains the annual average of gender employment gap, from 2005 to 2018. We will try to find out which country has the largest gap.
At first glance, I notice that the first row contains only NAs. Then I also notice that every other column is not useful for us. Finally, to visualize a time series plot, it is easier to work with a long format. Let’s clean up a bit.
OK, the data seems now to be in good shape. Before creating the plot, I still have to do one last step. I want to highlight the countries with the biggest gaps in terms of percentage of the population, i.e. all countries with a gap of more than 15%.
Okay, now let’s visualize it !
It seems that Turkey is the country with the largest gender employment gap, and by far. Malta, on the other hand, has made enormous progress in 13 years. What about France ?
If we take a closer look at our data, we see that there are two entities for France: France and France (metropolitan). As the entity France contains missing values, we will take the other one for the graph.
France is thus in the European average as regards the gender employment gap, and is also pretty stable.
The time series plot was a bit difficult to read. It would be much nicer to be able to show this difference in employment gap directly on a map. That is the purpose of my next part.
## Reading layer `ne_110m_admin_0_countries' from data source
## `/Users/valentinmonney/Documents/data science/R/EPFL-Applied_data_visualization_and_communication/projects_course_1/project3/data/naturalearth/ne_110m_admin_0_countries.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 177 features and 94 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: -180 ymin: -90 xmax: 180 ymax: 83.64513
## Geodetic CRS: WGS 84
Have you seen this light blue country? Turkey is the European country with the biggest difference and by far. The country is also at the edge of Europe, and is perhaps influenced by other cultures than the Western one.
Generally speaking, northern countries tend to be much more balanced than southeastern countries.
Choroplet is a thematic map where areas are divided by category. Here we will switch from a continuous scale into categories.
With this example, we can see the advantages and disadvantages of categories. Categories allow us to simplify the graph and thus better distinguish the differences. But we also lose precision. For example, now we don’t know which of these countries has the biggest difference, even if we know that it is in the southeast.
We could overcome this disadvantage by adding the exact percentage on each country.
Right now we have the numbers for 2018, it would be interesting to see the change in the rate between 2008 and 2018.
Despite some missing data, we can observe some trends. The western part of Europe tends to reduce gender employment inequality over the years. On the other hand, inequalities in the eastern part are stagnating or even increasing. We note that the northern countries lead the way with the lowest gender inequality in terms of employment rates. Surprisingly, the female employment rate was even higher than the male rate for Lithuania and Latvia in 2010. It would be interesting to dig a little deeper into why, but unfortunately that is not the current topic.
That was interesting, but now, I would like to do it a little bit differently. I would like to represent the differences of the different countries between 2014 and 2018 on a single map.
Despite the fact that the changes are small between 2014 and 2018, we can still tell in which direction they are going. In dark green countries, such as Turkey, Germany, the Czech Republic and the United Kingdom, the gap has decreased, which means that either the share of the female population in employment is increasing or the share of the male population is decreasing.
In the red countries, such as Spain, some eastern European countries and Finland, the opposite process has occurred. the gap has widened further.
Of course, we can also represent the map with another projection. let’s try with the Robinson Projection.
The primary purpose of The Robinson projection is to create visually appealing maps of the entire world. It is a compromise projection; it does not eliminate any type of distortion, but it keeps the levels of all types of distortion relatively low over most of the map.
With these graphs we can draw some results: the countries with the highest gender employment gap rate in Europe are :
| country | gap |
|---|---|
| Turkey | 40.8 |
| Malta | 21.9 |
| Macedonia | 21.4 |
| Greece | 21.0 |
| Italy | 19.8 |
Those with the lowest gender employment gap in Europe are:
| country | gap |
|---|---|
| Lithuania | 2.3 |
| Finland | 3.7 |
| Latvia | 4.2 |
| Sweden | 4.3 |
| Norway | 5.2 |
Finally, the countries in which the employment gap decreased the most in percentage points between 2014 and 2018 are:
| country | diff_14_18 |
|---|---|
| Malta | -4.9 |
| Luxembourg | -4.9 |
| Turkey | -2.6 |
| Czechia | -2.3 |
| United Kingdom | -1.4 |
This part is an open ended question. The requests were as follows:
For this purpose, I downloaded the geometries and some excel files from the Swiss Federal statistical Office website.
I was interested in the Swiss population data as well as the political parties from Switzerland at the level of the municipalities. The first question I would like to answer is which regions of Switzerland have the highest proportion of foreigners. The second part concerns the political parties in Switzerland. Here it is a question of determining what the political tendency is according to the regions of Switzerland.
A small note on this subject. I know that these are subjects that can be sensitive. I want to make it clear that I am not taking any position and do not wish to offend anyone’s sensibilities. I am simply commenting on the visual results without any ulterior motive or conclusion.
First of all, we need to download the files. The data concerning the map and the geometries can be found here: Base maps. The data concerning the infomations on the population and the political parties are here: Municipality_data. Ok, we have now everything we need. let’s try to produce something!
## Reading layer `K4polg20210101gf_ch2007Poly' from data source
## `/Users/valentinmonney/Documents/data science/R/EPFL-Applied_data_visualization_and_communication/projects_course_1/project3/data/swiss_shapefiles/K4_polg20210101_gf/K4polg20210101gf_ch2007Poly.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 2172 features and 2 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 2485203 ymin: 1075283 xmax: 2834035 ymax: 1295864
## Projected CRS: CH1903+ / LV95
## Reading layer `k4seenyyyymmdd11_ch2007Poly' from data source
## `/Users/valentinmonney/Documents/data science/R/EPFL-Applied_data_visualization_and_communication/projects_course_1/project3/data/swiss_shapefiles/K4_seenyyyymmdd/k4seenyyyymmdd11_ch2007Poly.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 23 features and 4 fields
## Geometry type: POLYGON
## Dimension: XY
## Bounding box: xmin: 2500375 ymin: 1064133 xmax: 2774275 ymax: 1297573
## Projected CRS: CH1903+ / LV95
## Reading layer `K4kant19970101gf_ch2007Poly' from data source
## `/Users/valentinmonney/Documents/data science/R/EPFL-Applied_data_visualization_and_communication/projects_course_1/project3/data/swiss_shapefiles/K4_kant19970101_gf/K4kant19970101gf_ch2007Poly.shp'
## using driver `ESRI Shapefile'
## Simple feature collection with 26 features and 4 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 2485203 ymin: 1075283 xmax: 2834035 ymax: 1295864
## Projected CRS: CH1903+ / LV95
According to the graph, it seems that the central part of Switzerland is not very populated in terms of foreign population. Indeed, it seems that they are more inclined to live in big cities such as Zürich, Geneva, Basel or Lausanne. It is also noticeable that certain municipalities along the border as well as Ticino also have a higher rate, probably due to border residents.
There are many political parties in Switzerland. However, there are some that stand out for their preponderance. Do you know what the trend is in Switzerland? Before going to the graph, I think it is useful to make a small reminder of the biggest political parties:
| Name | Acronym | Group | Political_Trends |
|---|---|---|---|
| Union democratique du centre | UDC | right | conservative/liberal/sovereignist |
| Parti Socialiste | PS | left | social democratic |
| Parti liberal-radical | PLR | center right | libreal/radical |
| Parti écologiste | PES | center left | environmentalist |
| Parti democrate-chrétien | PDC | center | Christian Democrat |
| Vert liberaux | PVL | center | environmentalist/social liberal |
We notice that in the center of Switzerland, there is a clear tendency for the UDC party while the south of Switzerland and especially in the Valais there is rather a PDC tendency. These are the two parties that stand out. We can therefore conclude that Switzerland is rather center-right or even right-wing. The French-speaking part (west) is much more nuanced with a more or less equal distribution between the PLR, the PS, the PES, the UDC and the PDC. The PVL, which is a new party, is still a bit behind. Did you notice the two communes in Ticino that have a majority of PES?
Well, that’s it! That’s the end of the report already. I hope you enjoyed reading it as much as I did making it :)